#pragma once

#include <memory>

template<typename T>
class BinaryTreeNode
{
public:
	explicit BinaryTreeNode(T const& value) : _value(value)
	{
	}

	std::shared_ptr<BinaryTreeNode<T>> left() const
	{
		return _left;
	}

	void setLeft(std::shared_ptr<BinaryTreeNode<T>> value)
	{
		_left = value;
	}

	std::shared_ptr<BinaryTreeNode> right() const
	{
		return _right;
	}

	void setRight(std::shared_ptr<BinaryTreeNode<T>> value)
	{
		_right = value;
	}

	T value() const
	{
		return _value;
	}

private:
	T _value;
	std::shared_ptr<BinaryTreeNode<T>> _left;
	std::shared_ptr<BinaryTreeNode<T>> _right;
};

